#pragma once

#include "../umlmodel_global.h"

#include <memory>
#include <vector>

#include "OccurrenceSpecification.h"

using std::make_shared;
using std::shared_ptr;
using std::vector;

namespace uml {
class ExecutionSpecification;

/// <summary>
/// ExecutionOccurrenceSpecification
/// An ExecutionOccurrenceSpecification represents moments in time at which Actions
/// or Behaviors start or finish.
/// </summary>
class UMLMODEL_EXPORT ExecutionOccurrenceSpecification : public OccurrenceSpecification {

public: // Constructors and destructors
    explicit ExecutionOccurrenceSpecification(const QString& umlType="uml::ExecutionOccurrenceSpecification");

public: // JsonSerializable override
    void fromJson(const QJsonObject& json, QStringList& errorList) override;
    void toJson(QJsonObject& json) override;

public: // Properties
    /// <summary>
    /// execution getter
    /// References the execution specification describing the execution that is started
    /// or finished at this execution event.
    /// </summary>
    shared_ptr<ExecutionSpecification> execution() const;

    /// <summary>
    /// execution setter
    /// References the execution specification describing the execution that is started
    /// or finished at this execution event.
    /// </summary>
    void setExecution(shared_ptr<ExecutionSpecification> value);

private: // Fields
    /// <summary>
    /// execution
    /// References the execution specification describing the execution that is started
    /// or finished at this execution event.
    /// </summary>
    shared_ptr<ExecutionSpecification> execution_;

};

} // namespace uml
